<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class TrainingApplicationResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id'=>(integer)$this->id,
            'organization_id'=>(integer)$this->organization_id,
            'organization'=>(string)$this->organization->name,
            'application_num'=>(integer)$this->application_num,
            'application_dura'=>$this->application_dura,
        ];
    }
}
